package com.kanasco.engg.model;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import org.apache.commons.lang.builder.HashCodeBuilder;

import bb.access.po.PartInventory;
import bb.access.po.PartUnit;
import bb.common.Constant;

@SuppressWarnings({ "deprecation", "deprecation", "deprecation" })
public class Item {
	public String partNumber;
	public String partType;
	public String revision="A";
	public String description="";
	public String partUnit="";
	 private String lastUser;
	  private Integer version = null;
	  private String origin = "";
	  private Date createdDate = new Date();
	  private String owner = "";
	  private String modelNumber = "";
	  private String buyerCode = "";
	  private String commodityCode = "";
	  private String productCode = "";
	  private String makeBuy = "MAKE";
	  private String saleable = "";
	  private String traceable = "";
	  private Byte traceableLevel = null;
	  private String newPart = "ENGINEERING USE ONLY";
	 
private Date revisionDate = new Date();
	  private String hold = "";
	  private float shippingWeight = 0.0F;
	  private String shippingWeightUnit = "";
	  private BigDecimal shippingLength = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal shippingWidth =new BigDecimal("0.00"); //BigDecimal.ZERO;
	  private BigDecimal shippingDepth = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal volume = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private String volumeUnit = "";
	 
	  private String comment = "";
	  private String drawingNumber = "";
	  private String drawing = "";
	  private String bill = "";
	  private String wi = "";
	  private String havePicture = "";
	  private Date lastChangeDate = new Date();
	  private String inspectionType = "";
	  private Set multiLanguage = new HashSet();
	  private Set vendors = new HashSet();
	  private Set manufacturers = new HashSet();
	  private PartInventory partInventory;
	  private String levels = "";
	  private String material = "";
	  private String isActivePart = "Y";
	  private String salesDrawing = "";
	  private String catalog = "";
	  private boolean deleted = false;
	  private String engGroup = "";
	  private String securityLevel = "";
	  private String partPoUnit = "";
	  private BigDecimal partPoUnitRate = BigDecimal.ONE;
	  private String detectionStandard = "";
	  private String countryOrigin = "";
	  private boolean recoil = false;
	  private boolean useBackflush = false;
	  private boolean discountable = true;
	  private boolean taxExempt = false;
	  private Set<PartUnit> units = new HashSet();
	  private String irType = Constant.IRType.AllExamines;
	  private BigDecimal multiQtyforApplying = new BigDecimal("0.00");//BigDecimal.ZERO;
	  
	  //PartInventory
	  private String active = "";
	  private BigDecimal onhand = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal shippedQty =new BigDecimal("0.00");// BigDecimal.ZERO;
	  private BigDecimal receivedQty =new BigDecimal("0.00");// BigDecimal.ZERO;
	  private BigDecimal workInProcessQty =new BigDecimal("0.00");// BigDecimal.ZERO;
	  private BigDecimal onloanQty = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal consignedQty = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal inQualityCheckingQty = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal onDemandQty = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal onOrderQty = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal listPrice =new BigDecimal("0.00");// BigDecimal.ZERO;
	  private BigDecimal averageCost = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal standardCost =new BigDecimal("0.00");// BigDecimal.ZERO;
	  private BigDecimal firstInCost = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private String pCode = "";
	  private String cCode = "";
	  private String oCode = "";
	  private String dCode = "";
	  private String eCode = "";
	  private String purchaseOrderUnit = "";
	  private String salesOrderUnit = "";
	  private BigDecimal leadTime = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal minQty = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal maxQty = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal yearUsage = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal quarterUsage = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private String ga = "";
	  private BigDecimal purchaseCost = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private BigDecimal shipInProcessQty =new BigDecimal("0.00");// BigDecimal.ZERO;
	  private BigDecimal shipInTransactionQty = new BigDecimal("0.00");//BigDecimal.ZERO;
	  private Date recostedDate = null;
	  private Date lastOutDate = null;
	  private Date lastInDate = null;
	  private String partClass = "";
	  private BigDecimal inSTO =new BigDecimal("0.00");// BigDecimal.ZERO;
	  private int cycleCount = 1;
	  private Date lastCount = null;
	  private Set listPrices = new HashSet();
	
	public Item() {
		super();
		
	}
	 public Item(String PartNumber, String PartType, String lastUser, Integer version, String owner, String description, String revision, Date revisionDate)
	  {
	    this.partNumber=partNumber;
	    this.partType=partType;
	    this.lastUser = lastUser;
	    this.version = version;
	    this.owner = owner;
	    this.description = description;
	    this.revision = revision;
	   // this.revisionDate = revisionDate;
	  }
	public String getPartNumber() {
		return partNumber;
	}
	public void setPartNumber(String partNumber) {
		this.partNumber = partNumber;
	}
	public String getPartType() {
		return partType;
	}
	public void setPartType(String partType) {
		this.partType = partType;
	}

	  public String getLastUser()
	  {
	    return this.lastUser;
	  }
	  
	  public void setLastUser(String lastUser)
	  {
	    this.lastUser = lastUser;
	  }
	  
	  public String getOrigin()
	  {
	    return this.origin;
	  }
	  
	  public void setOrigin(String origin)
	  {
	    this.origin = origin;
	  }
	  
	 public Date getCreatedDate()
	  {
	    return this.createdDate;
	  }
	  
	  public void setCreatedDate(Date createdDate)
	  {
	    this.createdDate = createdDate;
	  }
	  
	  public String getOwner()
	  {
	    return this.owner;
	  }
	  
	  public void setOwner(String owner)
	  {
	    this.owner = owner;
	  }
	  
	  public String getModelNumber()
	  {
	    return this.modelNumber;
	  }
	  
	  public void setModelNumber(String modelNumber)
	  {
	    this.modelNumber = modelNumber;
	  }
	  
	  public String getBuyerCode()
	  {
	    return this.buyerCode;
	  }
	  
	  public void setBuyerCode(String buyerCode)
	  {
	    this.buyerCode = buyerCode;
	  }
	  
	  public String getCommodityCode()
	  {
	    return this.commodityCode;
	  }
	  
	  public void setCommodityCode(String commodityCode)
	  {
	    this.commodityCode = commodityCode;
	  }
	  
	  public String getProductCode()
	  {
	    return this.productCode;
	  }
	  
	  public void setProductCode(String productCode)
	  {
	    this.productCode = productCode;
	  }
	  
	  public String getMakeBuy()
	  {
	    return this.makeBuy;
	  }
	  
	  public void setMakeBuy(String makeBuy)
	  {
	    this.makeBuy = makeBuy;
	  }
	  
	  public String getSaleable()
	  {
	    return this.saleable;
	  }
	  
	  public void setSaleable(String saleable)
	  {
	    this.saleable = saleable;
	  }
	  
	  public String getTraceable()
	  {
	    return this.traceable;
	  }
	  
	  public void setTraceable(String traceable)
	  {
	    this.traceable = traceable;
	  }
	  
	  public Byte getTraceableLevel()
	  {
	    return this.traceableLevel;
	  }
	  
	  public void setTraceableLevel(Byte traceableLevel)
	  {
	    this.traceableLevel = traceableLevel;
	  }
	  
	  public String getNewPart()
	  {
	    return this.newPart;
	  }
	  
	  public void setNewPart(String newPart)
	  {
	    this.newPart = newPart;
	  }
	  
	  public String getDescription()
	  {
	    return this.description;
	  }
	  
	  public void setDescription(String description)
	  {
	    this.description = description;
	  }
	  
	  public String getRevision()
	  {
	    return this.revision;
	  }
	  
	  public void setRevision(String revision)
	  {
	    this.revision = revision;
	  }
	  
	 public Date getRevisionDate()
	  {
	    return this.revisionDate;
	  }
	  
	  public void setRevisionDate(Date revisionDate)
	  {
	    this.revisionDate = revisionDate;
	  }
	  
	  public String getHold()
	  {
	    return this.hold;
	  }
	  
	  public void setHold(String hold)
	  {
	    this.hold = hold;
	  }
	  
	  public float getShippingWeight()
	  {
	    return this.shippingWeight;
	  }
	  
	  public void setShippingWeight(float shippingWeight)
	  {
	    this.shippingWeight = shippingWeight;
	  }
	  
	  public String getShippingWeightUnit()
	  {
	    return this.shippingWeightUnit;
	  }
	  
	  public void setShippingWeightUnit(String shippingWeightUnit)
	  {
	    this.shippingWeightUnit = shippingWeightUnit;
	  }
	  
	  public String getPartUnit()
	  {
	    return this.partUnit;
	  }
	  
	  public void setPartUnit(String partUnit)
	  {
	    this.partUnit = partUnit;
	  }
	  
	  public String getComment()
	  {
	    return this.comment;
	  }
	  
	  public void setComment(String comment)
	  {
	    this.comment = comment;
	  }
	  
	  public String getDrawingNumber()
	  {
	    return this.drawingNumber;
	  }
	  
	  public void setDrawingNumber(String drawingNumber)
	  {
	    this.drawingNumber = drawingNumber;
	  }
	  
	  public String getDrawing()
	  {
	    return this.drawing;
	  }
	  
	  public void setDrawing(String drawing)
	  {
	    this.drawing = drawing;
	  }
	  
	  public String getBill()
	  {
	    return this.bill;
	  }
	  
	  public void setBill(String bill)
	  {
	    this.bill = bill;
	  }
	  
	  public String getWi()
	  {
	    return this.wi;
	  }
	  
	  public void setWi(String wi)
	  {
	    this.wi = wi;
	  }
	  
	 public Date getLastChangeDate()
	  {
	    return this.lastChangeDate;
	  }
	  
	  public void setLastChangeDate(Date lastChangeDate)
	  {
	    this.lastChangeDate = lastChangeDate;
	  }
	  
	  public Set getMultiLanguage()
	  {
	    return this.multiLanguage;
	  }
	  
	  public void setMultiLanguage(Set multiLanguage)
	  {
	    this.multiLanguage = multiLanguage;
	  }
	  
	  public Set getVendors()
	  {
	    return this.vendors;
	  }
	  
	  public void setVendors(Set vendors)
	  {
	    this.vendors = vendors;
	  }
	  
	  public Set getManufacturers()
	  {
	    return this.manufacturers;
	  }
	  
	  public void setManufacturers(Set manufacturers)
	  {
	    this.manufacturers = manufacturers;
	  }
	  
	  public PartInventory getPartInventory()
	  {
	    return this.partInventory;
	  }
	  
	  public Integer getVersion()
	  {
	    return this.version;
	  }
	  
	  public String getMaterial()
	  {
	    return this.material;
	  }
	  
	  public String getLevels()
	  {
	    return this.levels;
	  }
	  
	  public String getIsActivePart()
	  {
	    return this.isActivePart;
	  }
	  
	  public void setPartInventory(PartInventory partInventory)
	  {
	    this.partInventory = partInventory;
	  }
	  
	  public void setVersion(Integer version)
	  {
	    this.version = version;
	  }
	  
	  public void setMaterial(String material)
	  {
	    this.material = material;
	  }
	  
	  public void setLevels(String levels)
	  {
	    this.levels = levels;
	  }
	  
	  public void setIsActivePart(String isActivePart)
	  {
	    this.isActivePart = isActivePart;
	  }
	  
	  public BigDecimal getVolume()
	  {
	    return this.volume;
	  }
	  
	  public void setVolume(BigDecimal volume)
	  {
	    this.volume = volume;
	  }
	  
	  public String getVolumeUnit()
	  {
	    return this.volumeUnit;
	  }
	  
	  public void setVolumeUnit(String volumeUnit)
	  {
	    this.volumeUnit = volumeUnit;
	  }
	  
	  public BigDecimal getShippingDepth()
	  {
	    return this.shippingDepth;
	  }
	  
	  public void setShippingDepth(BigDecimal shippingDepth)
	  {
	    this.shippingDepth = shippingDepth;
	  }
	  
	  public BigDecimal getShippingLength()
	  {
	    return this.shippingLength;
	  }
	  
	  public void setShippingLength(BigDecimal shippingLength)
	  {
	    this.shippingLength = shippingLength;
	  }
	  
	  public BigDecimal getShippingWidth()
	  {
	    return this.shippingWidth;
	  }
	  
	  public void setShippingWidth(BigDecimal shippingWidth)
	  {
	    this.shippingWidth = shippingWidth;
	  }
	  
	  public String getSalesDrawing()
	  {
	    return this.salesDrawing;
	  }
	  
	  public void setSalesDrawing(String salesDrawing)
	  {
	    this.salesDrawing = salesDrawing;
	  }
	  
	 /* public String toString()
	  {
	    return new ToStringBuilder(this).append("pk", getPk()).toString();
	  }
	  
	  public boolean equals(Object other)
	  {
	    if (!(other instanceof Part)) {
	      return false;
	    }
	    Part castOther = (Part)other;
	    return new EqualsBuilder().append(getPk(), castOther.getPk()).isEquals();
	  }*/
	  
	/*  public int hashCode()
	  {
	    return new HashCodeBuilder().append(getPk()).toHashCode();
	  }
	  */
	  public String getHavePicture()
	  {
	    return this.havePicture;
	  }
	  
	  public void setHavePicture(String havePicture)
	  {
	    this.havePicture = havePicture;
	  }
	  
	  public String getCatalog()
	  {
	    return this.catalog;
	  }
	  
	  public void setCatalog(String catalog)
	  {
	    this.catalog = catalog;
	  }
	  
	  public boolean isDeleted()
	  {
	    return this.deleted;
	  }
	  
	  public void setDeleted(boolean deleted)
	  {
	    this.deleted = deleted;
	  }
	  
	  public String getSecurityLevel()
	  {
	    return this.securityLevel;
	  }
	  
	  public void setSecurityLevel(String securityLevel)
	  {
	    this.securityLevel = securityLevel;
	  }
	  
	  public String getEngGroup()
	  {
	    return this.engGroup;
	  }
	  
	  public void setEngGroup(String engGroup)
	  {
	    this.engGroup = engGroup;
	  }
	  
	  public String getPartPoUnit()
	  {
	    return this.partPoUnit;
	  }
	  
	  public void setPartPoUnit(String partPoUnit)
	  {
	    this.partPoUnit = partPoUnit;
	  }
	  
	  public BigDecimal getPartPoUnitRate()
	  {
	    return this.partPoUnitRate;
	  }
	  
	  public void setPartPoUnitRate(BigDecimal partPoUnitRate)
	  {
	    this.partPoUnitRate = partPoUnitRate;
	  }
	  
	  public String getDetectionStandard()
	  {
	    return this.detectionStandard;
	  }
	  
	  public void setDetectionStandard(String detectionStandard)
	  {
	    this.detectionStandard = detectionStandard;
	  }
	  
	  public String getCountryOrigin()
	  {
	    return this.countryOrigin;
	  }
	  
	  public void setCountryOrigin(String countryOrigin)
	  {
	    this.countryOrigin = countryOrigin;
	  }
	  
	  public String getInspectionType()
	  {
	    return this.inspectionType;
	  }
	  
	  public void setInspectionType(String inspectionType)
	  {
	    this.inspectionType = inspectionType;
	  }
	  
	  public Set<PartUnit> getUnits()
	  {
	    return this.units;
	  }
	  
	  public void setUnits(Set<PartUnit> units)
	  {
	    this.units = units;
	  }
	  
	  public String getIrType()
	  {
	    return this.irType;
	  }
	  
	  public void setIrType(String irType)
	  {
	    this.irType = irType;
	  }
	  
	  public boolean isRecoil()
	  {
	    return this.recoil;
	  }
	  
	  public void setRecoil(boolean recoil)
	  {
	    this.recoil = recoil;
	  }
	  
	  public boolean isUseBackflush()
	  {
	    return this.useBackflush;
	  }
	  
	  public void setUseBackflush(boolean useBackflush)
	  {
	    this.useBackflush = useBackflush;
	  }
	  
	  public boolean isDiscountable()
	  {
	    return this.discountable;
	  }
	  
	  public void setDiscountable(boolean discountable)
	  {
	    this.discountable = discountable;
	  }
	  
	  public boolean isTaxExempt()
	  {
	    return this.taxExempt;
	  }
	  
	  public void setTaxExempt(boolean taxExempt)
	  {
	    this.taxExempt = taxExempt;
	  }
	  
	  public BigDecimal getMultiQtyforApplying()
	  {
	    return this.multiQtyforApplying;
	  }
	  
	  public void setMultiQtyforApplying(BigDecimal multiQtyforApplying)
	  {
	    this.multiQtyforApplying = multiQtyforApplying;
	  }
	

	public String toString(){
		StringBuilder builder=new StringBuilder();
		builder.append(partNumber);
		builder.append(",");
		builder.append(partType);
		builder.append(",");
		builder.append(revision);
		builder.append(",");
		builder.append(partUnit);
		return builder.toString();
	}
//partinventory
	public String getActive() {
		return active;
	}
	public void setActive(String active) {
		this.active = active;
	}
	public BigDecimal getOnhand() {
		return onhand;
	}
	public void setOnhand(BigDecimal onhand) {
		this.onhand = onhand;
	}
	public BigDecimal getShippedQty() {
		return shippedQty;
	}
	public void setShippedQty(BigDecimal shippedQty) {
		this.shippedQty = shippedQty;
	}
	public BigDecimal getReceivedQty() {
		return receivedQty;
	}
	public void setReceivedQty(BigDecimal receivedQty) {
		this.receivedQty = receivedQty;
	}
	public BigDecimal getWorkInProcessQty() {
		return workInProcessQty;
	}
	public void setWorkInProcessQty(BigDecimal workInProcessQty) {
		this.workInProcessQty = workInProcessQty;
	}
	public BigDecimal getOnloanQty() {
		return onloanQty;
	}
	public void setOnloanQty(BigDecimal onloanQty) {
		this.onloanQty = onloanQty;
	}
	public BigDecimal getConsignedQty() {
		return consignedQty;
	}
	public void setConsignedQty(BigDecimal consignedQty) {
		this.consignedQty = consignedQty;
	}
	public BigDecimal getInQualityCheckingQty() {
		return inQualityCheckingQty;
	}
	public void setInQualityCheckingQty(BigDecimal inQualityCheckingQty) {
		this.inQualityCheckingQty = inQualityCheckingQty;
	}
	public BigDecimal getOnDemandQty() {
		return onDemandQty;
	}
	public void setOnDemandQty(BigDecimal onDemandQty) {
		this.onDemandQty = onDemandQty;
	}
	public BigDecimal getOnOrderQty() {
		return onOrderQty;
	}
	public void setOnOrderQty(BigDecimal onOrderQty) {
		this.onOrderQty = onOrderQty;
	}
	public BigDecimal getListPrice() {
		return listPrice;
	}
	public void setListPrice(BigDecimal listPrice) {
		this.listPrice = listPrice;
	}
	public BigDecimal getAverageCost() {
		return averageCost;
	}
	public void setAverageCost(BigDecimal averageCost) {
		this.averageCost = averageCost;
	}
	public BigDecimal getStandardCost() {
		return standardCost;
	}
	public void setStandardCost(BigDecimal standardCost) {
		this.standardCost = standardCost;
	}
	public BigDecimal getFirstInCost() {
		return firstInCost;
	}
	public void setFirstInCost(BigDecimal firstInCost) {
		this.firstInCost = firstInCost;
	}
	public String getpCode() {
		return pCode;
	}
	public void setpCode(String pCode) {
		this.pCode = pCode;
	}
	public String getcCode() {
		return cCode;
	}
	public void setcCode(String cCode) {
		this.cCode = cCode;
	}
	public String getoCode() {
		return oCode;
	}
	public void setoCode(String oCode) {
		this.oCode = oCode;
	}
	public String getdCode() {
		return dCode;
	}
	public void setdCode(String dCode) {
		this.dCode = dCode;
	}
	public String geteCode() {
		return eCode;
	}
	public void seteCode(String eCode) {
		this.eCode = eCode;
	}
	public String getPurchaseOrderUnit() {
		return purchaseOrderUnit;
	}
	public void setPurchaseOrderUnit(String purchaseOrderUnit) {
		this.purchaseOrderUnit = purchaseOrderUnit;
	}
	public String getSalesOrderUnit() {
		return salesOrderUnit;
	}
	public void setSalesOrderUnit(String salesOrderUnit) {
		this.salesOrderUnit = salesOrderUnit;
	}
	public BigDecimal getLeadTime() {
		return leadTime;
	}
	public void setLeadTime(BigDecimal leadTime) {
		this.leadTime = leadTime;
	}
	public BigDecimal getMinQty() {
		return minQty;
	}
	public void setMinQty(BigDecimal minQty) {
		this.minQty = minQty;
	}
	public BigDecimal getMaxQty() {
		return maxQty;
	}
	public void setMaxQty(BigDecimal maxQty) {
		this.maxQty = maxQty;
	}
	public BigDecimal getYearUsage() {
		return yearUsage;
	}
	public void setYearUsage(BigDecimal yearUsage) {
		this.yearUsage = yearUsage;
	}
	public BigDecimal getQuarterUsage() {
		return quarterUsage;
	}
	public void setQuarterUsage(BigDecimal quarterUsage) {
		this.quarterUsage = quarterUsage;
	}
	public String getGa() {
		return ga;
	}
	public void setGa(String ga) {
		this.ga = ga;
	}
	public BigDecimal getPurchaseCost() {
		return purchaseCost;
	}
	public void setPurchaseCost(BigDecimal purchaseCost) {
		this.purchaseCost = purchaseCost;
	}
	public BigDecimal getShipInProcessQty() {
		return shipInProcessQty;
	}
	public void setShipInProcessQty(BigDecimal shipInProcessQty) {
		this.shipInProcessQty = shipInProcessQty;
	}
	public BigDecimal getShipInTransactionQty() {
		return shipInTransactionQty;
	}
	public void setShipInTransactionQty(BigDecimal shipInTransactionQty) {
		this.shipInTransactionQty = shipInTransactionQty;
	}
	public Date getRecostedDate() {
		return recostedDate;
	}
	public void setRecostedDate(Date recostedDate) {
		this.recostedDate = recostedDate;
	}
	public Date getLastOutDate() {
		return lastOutDate;
	}
	public void setLastOutDate(Date lastOutDate) {
		this.lastOutDate = lastOutDate;
	}
	public Date getLastInDate() {
		return lastInDate;
	}
	public void setLastInDate(Date lastInDate) {
		this.lastInDate = lastInDate;
	}
	public String getPartClass() {
		return partClass;
	}
	public void setPartClass(String partClass) {
		this.partClass = partClass;
	}
	public BigDecimal getInSTO() {
		return inSTO;
	}
	public void setInSTO(BigDecimal inSTO) {
		this.inSTO = inSTO;
	}
	public int getCycleCount() {
		return cycleCount;
	}
	public void setCycleCount(int cycleCount) {
		this.cycleCount = cycleCount;
	}
	public Date getLastCount() {
		return lastCount;
	}
	public void setLastCount(Date lastCount) {
		this.lastCount = lastCount;
	}
	public Set getListPrices() {
		return listPrices;
	}
	public void setListPrices(Set listPrices) {
		this.listPrices = listPrices;
	}
	
}
